<?php

namespace App\Http\Controllers\Client\Member;

use App\Models\Ass;
use App\Models\AssMember;
use App\Models\Member\Follow;
use App\Models\Member\Member;
use App\Http\Controllers\RootController as Controller;
use App\Models\Obj;
use App\Services\Com\StatisticsService;
use Illuminate\Http\Request;

class ObjListController extends Controller
{
    public function handle(Request $request)
    {
        $param['limit'] = (int)$request->get('limit', 10);


        $query = Obj::orderBy('id', 'desc');
        $query->where('org_id', $this->user()->org_id);

        $query->with('nation');

//        $query->select(['id', 'title', 'coordinate']);

        $rows = $query->get();

        return $this->success($rows);
    }
}
